package com.tanhua.model.mongo;


import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.bson.types.ObjectId;
import org.springframework.data.mongodb.core.mapping.Document;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Document(collection = "focus")
public class Focus implements java.io.Serializable{

    private ObjectId id;
    private ObjectId publishId;    //视频id
    private Integer commentType;   //视频评论类型，1-点赞，2-评论，3-喜欢
    private String content;        //视频评论内容
    private Long userId;           //视频评论人
    private Long publishUserId;    //视频被评论人ID
    private Long created; 		   //发表时间
    private Integer likeCount = 0; //当前评论的点赞数


/*    //根据评论类型，获取对应的互动数量
    public Integer statisCount(Integer commentType) {
        if (commentType == CommentType.LIKE.getType()) {
            return this.likeCount;
        } else if (commentType == CommentType.COMMENT.getType()) {
            return this.commentCount;
        } else {
            return loveCount;
        }
    }*/
}
